* 2 order bindpass filter :1 highpass + 1lowpass

* 1order highpass filter
C1 in hp1 3.535e-06
R1 hp1 0 1000

* 1order lowpass filter
R2 hp1 out 100000
C2 out 0 1.986e-10
Vin in 0 AC 1
.AC LIN 10000 1Hz 10kHz
.MEASURE AC max_vdb MAX VDB(out)
.MEASURE AC f_low WHEN VDB(out)='max_vdb-3' CROSS=1
.MEASURE AC f_high WHEN VDB(out)='max_vdb-3' CROSS=2
.MEASURE AC bw PARAM='f_high-f_low'
.MEASURE AC f_center PARAM='sqrt(f_low*f_high)'
.PROBE AC VDB(out) VP(out)
.OPTIONS POST
.END